package com.xuebusi.toutiao.admin.api.article.vo;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 创建文章接口参数
 */
@Data
@Validated
public class ArticleCreatePVO {
    // 文章标题
    @NotBlank(message = "文章标题不能为空")
    private String title;

    // 文章内容
    @NotBlank(message = "文章内容不能为空")
    private String content;

    // 文章频道id
    @NotNull(message = "文章频道不能为空")
    private Integer channel_id;

    // 文章封面
    @Valid
    private ArticleCover cover;
}
